import  request from '../utils/request'
import { AxiosPromise } from 'axios'

export function login_phone(loginData: unknown): AxiosPromise<any> {
    return request({
        url: '/login/cellphone',
        method: 'get',
        params: loginData
    })
}
export function login_email(email: string, password: string): AxiosPromise<any> {
    return request({
        url: '/login',
        method: 'get',
        params: { email: email, password: password }
    })
}
export function getUserInfo(id: string | null) {//获取用户信息
    return request({
        url: '/user/detail',
        method: 'get',
        params: {uid: id}
    })
}
export function getAccountInfo(id: string | null) {
    return request({
        url: '/user/account',
        method: 'get',
        params: {id: id}
    })
}